<template>
  <div class="equipment-box mine-box">
    <div class="eq-title-box">
      <div class="user-box-title" :style="back">
         <adminuserinfo></adminuserinfo>
        <mu-row gutter class="e-money-box">
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">本月收益</p>
              <p class="em-number">¥{{num.month}}</p>
            </div>
          </mu-col>
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">今日收益</p>
              <p class="em-number">¥{{num.today}}</p>
            </div>
          </mu-col>
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">完成订单</p>
              <p class="em-number">{{num.order}}</p>
            </div>
          </mu-col>
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">总收益</p>
              <p class="em-number">¥{{num.sumOrdergold}}</p>
            </div>
          </mu-col>
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">设备总数</p>
              <p class="em-number">{{num.totalDevices}}</p>
            </div>
          </mu-col>
          <mu-col span="6">
            <div class="grid-cell">
              <p class="em-title">设备总耗电量</p>
              <p class="em-number">¥{{num.totalPowerConsumption}}度</p>
            </div>
          </mu-col>
        </mu-row>
      </div>
    </div>
    <mu-row gutter class="list-box List">
      <mu-col span="12">
        <mu-paper>
          <mu-list>
            <mu-list-item to="/admin/bil">
              <mu-list-item-content>
                <mu-list-item-title>
                    <span class="iconfont icon-chongzhijilu"></span>
                  账单明细
                   <span size="25" class="fright iconfont icon-narrow"></span>

                </mu-list-item-title>
              </mu-list-item-content>
            </mu-list-item>
            <mu-divider></mu-divider>
            <mu-list-item to="/admin/address">
              <mu-list-item-content>
                <mu-list-item-title>
                    <span class="iconfont icon-dizhi"></span>
                  地址统计
                   <span size="25" class="fright iconfont icon-narrow"></span>

                </mu-list-item-title>
              </mu-list-item-content>
            </mu-list-item>
            <mu-divider></mu-divider>
            <mu-list-item to="/admin/time">
              <mu-list-item-content>
                <mu-list-item-title>
                    <span class="iconfont icon-shijian"></span>
                  时间统计
                   <span size="25" class="fright iconfont icon-narrow"></span>

                </mu-list-item-title>
              </mu-list-item-content>
            </mu-list-item>
            <mu-divider></mu-divider>
          </mu-list>
        </mu-paper>
      </mu-col>
    </mu-row>
  </div>
</template>

<script>

export default {
  data() {
    return {
      num: {
        month: 0,
        today: 0,
        order: 0,
        sumOrdergold: 0,
          totalDevices:0,
          totalPowerConsumption:0
      },
      back: {
        background:
          "url(" + require("../../../assets/image/minebackimg.png") + ")",
        backgroundRepeat: "no-repeat",
        backgroundSize: "cover"
      }
    };
  },
  mounted(){
    this.$api.getOperateData().then(res=>{

      this.num.today = res.data.data.sumDayOrdergold;
      this.num.order = res.data.data.sumOders;
      this.num.sumOrdergold = res.data.data.sumOrdergold;
      this.num.totalDevices = res.data.data.totalDevices;
      this.num.totalPowerConsumption = res.data.data.totalPowerConsumption;

    });
      this.$api.getMonProfit().then(res=>{

      this.num.month = res.data.data.sumOrdergold;

    })
  }
};
</script>

<style>
</style>
